package miaofusdk

/**
工行支付的订单数据
*/
type IcbcpayRefundOrder struct {
	Id                 int    `json:"id,omitempty,string"`
	TradeNo            string `json:"trade_no,omitempty"`
	UpTradeNo          string `json:"up_trade_no,omitempty"`
	BankCardNo         string `json:"bank_card_no,omitempty"`
	RefundTradeNo      string `json:"refund_trade_no,omitempty"`
	TotalAmount        int    `json:"total_amount,omitempty,string"`
	RefundAmount       int    `json:"refund_amount,omitempty,string"`
	RealRefundAmount   int    `json:"real_refund_amount,omitempty,string"`
	RefundPoint        int    `json:"refund_point,omitempty,string"`
	RefundEcoupon      int    `json:"refund_ecoupon,omitempty,string"`
	RefundMerDiscAmt   int    `json:"refund_mer_disc_amt,omitempty,string"`
	RefundTotalDiscAmt int    `json:"refund_total_disc_amt,omitempty,string"`
	UpMsgId            string `json:"up_msg_id,omitempty"`
	TimeEnd            string `json:"time_end,omitempty"`
	MchCode            string `json:"mch_code,omitempty"`
	MchECode           string `json:"mch_e_code,omitempty"`
	StoreCode          string `json:"store_code,omitempty"`
	ShopCode           string `json:"shop_code,omitempty"`
	OrgCode            string `json:"org_code,omitempty"`
	TradeType          string `json:"trade_type,omitempty"`
	StoreName          string `json:"store_name,omitempty"`
	TradeChannel       string `json:"trade_channel,omitempty"`
	TradeStatus        string `json:"trade_status,omitempty"`
	RefundResult       string `json:"refund_result,omitempty"`
	RefundReason       string `json:"refund_reason,omitempty"`
	RefundOperId       string `json:"refund_oper_id,omitempty"`
	TerminalCode       string `json:"terminal_code,omitempty"`
	RefundTime         string `json:"refund_time,omitempty"`
}

type IcbcpayOrder struct {
	Id                int    `json:"id,omitempty,string"`
	TradeNo           string `json:"trade_no,omitempty"`
	UpTradeNo         string `json:"up_trade_no,omitempty"`
	DownTradeNo       string `json:"down_trade_no,omitempty"`
	TradeStatus       string `json:"trade_status,omitempty"`
	BuyerId           string `json:"buyer_id,omitempty"`
	BankCardNo        string `json:"bank_card_no,omitempty"`
	TotalAmount       int    `json:"total_amount,omitempty,string"`
	PointAmount       int    `json:"point_amount,omitempty,string"`
	EcouponAmount     int    `json:"ecoupon_amount,omitempty,string"`
	MerDiscAmt        int    `json:"mer_disc_amt,omitempty,string"`
	CouponAmt         int    `json:"coupon_amt,omitempty,string"`
	BankDiscAmt       int    `json:"bank_disc_amt,omitempty,string"`
	PaymentAmt        int    `json:"payment_amt,omitempty,string"`
	TotalDiscAmt      int    `json:"total_disc_amt,omitempty,string"`
	UpMsgId           string `json:"up_msg_id,omitempty"`
	TimeEnd           string `json:"time_end,omitempty"`
	PayTime           string `json:"pay_time,omitempty"`
	MchCode           string `json:"mch_code,omitempty"`
	MchECode          string `json:"mch_e_code,omitempty"`
	StoreCode         string `json:"store_code,omitempty"`
	ShopCode          string `json:"shop_code,omitempty"`
	OrgCode           string `json:"org_code,omitempty"`
	BarCode           string `json:"bar_code,omitempty"`
	Subject           string `json:"subject,omitempty"`
	Attach            string `json:"attach,omitempty"`
	TerminalCode      string `json:"terminal_code,omitempty"`
	OperId            string `json:"oper_id,omitempty"`
	GoodsDetail       string `json:"goods_detail,omitempty"`
	BatchNo           int    `json:"batch_no,omitempty"`
	UndiscountableAmt string `json:"undiscount_amount,omitempty"`
	TradeType         string `json:"trade_type,omitempty"`
	StoreName         string `json:"store_name,omitempty"`
	TradeChannel      string `json:"trade_channel,omitempty"`
	CodeUrl           string `json:"code_url,omitempty"`
	CancelTime        string `json:"cancel_time,omitempty"`
	IsRollBack        bool   `json:"is_roll_back"`
	BankType          string `json:"bank_type,omitempty"`
	OriginTradeNo     string `json:"origin_trade_no,omitempty"`
}

type RespIcbcpayOrderDetail struct {
	//订单数据
	Order IcbcpayOrder `json:"order,omitempty"`
	//这笔订单下包含的所有退款成功和撤单成功的记录
	//工行只支持全部退款..所以要么退款..
	RefundOrder []IcbcpayRefundOrder `json:"refund_order,omitempty"`
}

type RespIcbcpayOrder struct {
	Response
	Data RespIcbcpayOrderDetail `json:"data,omitempty"`
}

/**
订单详情..
交易成功的直接返回.
非成功的.主动确认一次
*/
